package com.gitee.chili.leisure.domain;

import com.gitee.chili.leisure.base.GenerateId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.persistence.*;
import java.math.BigDecimal;

/**
 * EntryRoomRecord
 *
 * @author week solider
 * @since 2020.09.02
 */
@Data
@Entity
@Accessors(chain = true)
@Table(name = "entry_room")
@EqualsAndHashCode(callSuper = true)
public class EntryRoom extends GenerateId<Long> {

    @OneToOne
    @JoinColumn(name = "room_id")
    private Room room;

    @Column(name = "room_number")
    private Long roomNumber;

    @OneToOne
    @JoinColumn(name = "member_id")
    private Member member;

    /**
     * 玩家游戏币数量
     */
    private BigDecimal coins;

    /**
     * 头像地址
     */
    private String portrait;

    /**
     * 是否在场
     * 1: 是、0: 否
     */
    private Integer status;

    /**
     * 玩家邸的房间座位号
     */
    private Integer position;

    public EntryRoom() {
    }
}
